<template>
  <div class="home-container">
    <!-- 顶部导航栏 -->
    <header class="home-header">
      <div class="logo-container">
        <div class="logo">
          <i class="logo-icon">🏷️</i>
          <h1 class="logo-text">优品二手</h1>
        </div>
        <p class="logo-slogan">品质生活，从优开始</p>
      </div>
      <nav class="nav-menu">
        <button @click="goToLogin" v-if="!isLoggedIn" class="nav-button">登录</button>
        <button @click="goToRegister" v-if="!isLoggedIn" class="nav-button">注册</button>
        <button @click="goToProfile" v-if="isLoggedIn" class="nav-button">
          <i class="nav-icon">👤</i>
          <span>个人中心</span>
        </button>
        <button 
          @click="goToVip" 
          v-if="isLoggedIn" 
          :class="['nav-button', { 'vip-button': !isVip }]"
          class="vip-button"
        >
          <i class="nav-icon">👑</i>
          <span v-if="isVip">VIP中心</span>
          <span v-else>升级VIP</span>
        </button>
      </nav>
    </header>

    <!-- 轮播图 -->
    <div class="banner-container" @mouseenter="stopSlideInterval" @mouseleave="startSlideInterval">
      <transition name="banner-fade" mode="out-in">
        <div 
          :key="`vip-banner-${currentBannerIndex}`"
          class="banner" 
          @click="goToVip" 
          v-if="currentBannerIndex === 2 && !isVip" 
          style="cursor: pointer;"
        >
          <img :src="banners[currentBannerIndex].image" :alt="banners[currentBannerIndex].title">
          <div class="banner-overlay">
            <h3 class="banner-title">{{ banners[currentBannerIndex].title }}</h3>
            <p class="banner-subtitle">立即升级享受专属特权</p>
            <button class="banner-button">了解详情</button>
          </div>
        </div>
        <div 
          :key="`normal-banner-${currentBannerIndex}`"
          class="banner" 
          v-else
        >
          <img :src="banners[currentBannerIndex].image" :alt="banners[currentBannerIndex].title">
          <div class="banner-overlay">
            <h3 class="banner-title">{{ banners[currentBannerIndex].title }}</h3>
            <button class="banner-button">立即查看</button>
          </div>
        </div>
      </transition>
      <div class="banner-indicators">
        <span 
          v-for="(banner, index) in banners" 
          :key="banner.id"
          :class="['indicator', { active: index === currentBannerIndex }]"
          @click="currentBannerIndex = index"
        ></span>
      </div>
      <button class="banner-control prev" @click="prevSlide">&lt;</button>
      <button class="banner-control next" @click="nextSlide">&gt;</button>
    </div>

    <!-- 平台优势 -->
    <section class="features-section">
      <h2 class="section-title">平台优势</h2>
      <div class="features-grid">
        <div class="feature-item">
          <div class="feature-icon">🛡️</div>
          <h3 class="feature-title">品质保证</h3>
          <p class="feature-description">所有商品经过严格质检，确保品质可靠</p>
        </div>
        <div class="feature-item">
          <div class="feature-icon">💰</div>
          <h3 class="feature-title">价格透明</h3>
          <p class="feature-description">明码标价，无隐藏费用，让您放心购买</p>
        </div>
        <div class="feature-item">
          <div class="feature-icon">🔒</div>
          <h3 class="feature-title">安全交易</h3>
          <p class="feature-description">平台担保交易，保障买卖双方权益</p>
        </div>
        <div class="feature-item">
          <div class="feature-icon">💬</div>
          <h3 class="feature-title">优质服务</h3>
          <p class="feature-description">专业客服团队，7*12小时在线解答</p>
        </div>
      </div>
    </section>

    <!-- 分类导航 -->
    <section class="category-section">
      <h2 class="section-title">商品分类</h2>
      <div class="category-container">
        <button 
          v-for="category in categories" 
          :key="category"
          :class="['category-button', { active: selectedCategory === category }]"
          @click="changeCategory(category)"
        >
          {{ category }}
          <span v-if="category === 'VIP专属'" class="vip-tag">VIP</span>
        </button>
      </div>
    </section>

    <!-- 商品列表 -->
    <section class="products-section">
      <h2 class="section-title">
        <span v-if="selectedCategory === '全部'">推荐商品</span>
        <span v-else>{{ selectedCategory }}</span>
      </h2>
      <div v-if="filteredProducts.length === 0" class="no-products">
        <p v-if="selectedCategory === 'VIP专属'">您还不是VIP会员，请先升级VIP查看专属商品！</p>
        <p v-else>暂无相关商品</p>
        <button class="action-button" @click="selectedCategory = '全部'">查看全部商品</button>
      </div>
      <div v-else class="products-container">
        <div 
          v-for="(item, index) in filteredProducts" 
          :key="item.id"
          class="product-card"
          @click="productClickHandler(item)"
          :style="{ animationDelay: `${index * 0.1}s` }"
        >
          <div class="product-image-container">
            <img :src="item.image" :alt="item.title" class="product-image">
            <span v-if="item.isVipExclusive" class="vip-badge">VIP专属</span>
            <span v-if="getVipDiscount(item)" class="vip-discount">{{ getVipDiscount(item) }}%OFF</span>
          </div>
          <div class="product-info">
            <h3 class="product-title">{{ item.title }}</h3>
            <div class="product-price-container">
              <span class="product-price">
                {{ formatPrice(isVip && item.vipPrice ? item.vipPrice : item.price) }}
              </span>
              <span v-if="isVip && item.vipPrice && item.vipPrice < item.price" class="original-price">
                {{ formatPrice(item.price) }}
              </span>
            </div>
            <button class="view-details-button">查看详情</button>
          </div>
        </div>
      </div>
    </section>

    <!-- 底部信息 -->
    <footer class="page-footer">
      <div class="footer-content">
        <div class="footer-section">
          <h3>关于我们</h3>
          <p>优品二手交易平台，为您提供高品质的二手商品和优质服务</p>
        </div>
        <div class="footer-section">
          <h3>联系方式</h3>
          <p>客服电话：400-123-4567</p>
          <p>工作时间：9:00-21:00</p>
        </div>
        <div class="footer-section">
          <h3>关注我们</h3>
          <div class="social-icons">
            <i class="social-icon">🔍</i>
            <i class="social-icon">📱</i>
            <i class="social-icon">💬</i>
          </div>
        </div>
      </div>
      <div class="footer-bottom">
        <p>© 2024 优品二手交易平台 版权所有</p>
      </div>
    </footer>
  </div>
</template>

<script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();
const currentBannerIndex = ref(0);
const selectedCategory = ref('全部');
const slideInterval = ref(null);

// 模拟数据
const banners = [
  {
    id: 1,
    title: '新品特惠',
    image: 'https://picsum.photos/id/26/1200/400'
  },
  {
    id: 2,
    title: '精选好物',
    image: 'https://picsum.photos/id/250/1200/400'
  },
  {
    id: 3,
    title: 'VIP专属特权',
    image: 'https://picsum.photos/id/28/1200/400'
  }
];

const categories = ['全部', '电子产品', '服装鞋包', '家居日用', '图书文具', 'VIP专属'];

const products = [
  {
    id: 1,
    title: 'iPhone 13 Pro Max',
    price: 5999,
    vipPrice: 5499,
    image: 'https://picsum.photos/id/119/300/300',
    category: '电子产品',
    isVipExclusive: false
  },
  {
    id: 2,
    title: 'MacBook Air M2',
    price: 8999,
    vipPrice: 8499,
    image: 'https://picsum.photos/id/160/300/300',
    category: '电子产品',
    isVipExclusive: false
  },
  {
    id: 3,
    title: 'Nike Air Jordan 1',
    price: 1299,
    vipPrice: 1199,
    image: 'https://picsum.photos/id/20/300/300',
    category: '服装鞋包',
    isVipExclusive: false
  },
  {
    id: 4,
    title: 'Sony WH-1000XM5',
    price: 2999,
    vipPrice: 2699,
    image: 'https://picsum.photos/id/96/300/300',
    category: '电子产品',
    isVipExclusive: true
  },
  {
    id: 5,
    title: '宜家书桌',
    price: 799,
    vipPrice: 749,
    image: 'https://picsum.photos/id/116/300/300',
    category: '家居日用',
    isVipExclusive: false
  },
  {
    id: 6,
    title: '《人类简史》精装版',
    price: 89,
    vipPrice: 79,
    image: 'https://picsum.photos/id/24/300/300',
    category: '图书文具',
    isVipExclusive: false
  },
  {
    id: 7,
    title: 'LV 手提包',
    price: 15999,
    vipPrice: 14999,
    image: 'https://picsum.photos/id/21/300/300',
    category: '服装鞋包',
    isVipExclusive: true
  },
  {
    id: 8,
    title: '戴森吸尘器',
    price: 3999,
    vipPrice: 3699,
    image: 'https://picsum.photos/id/106/300/300',
    category: '家居日用',
    isVipExclusive: true
  }
];

// 模拟用户状态
const isLoggedIn = ref(true);
const isVip = ref(false);

// 计算属性
const filteredProducts = computed(() => {
  if (selectedCategory.value === '全部') {
    return products.filter(product => !product.isVipExclusive || isVip.value);
  } else if (selectedCategory.value === 'VIP专属') {
    return isVip.value ? products.filter(product => product.isVipExclusive) : [];
  } else {
    return products.filter(product => 
      product.category === selectedCategory.value && 
      (!product.isVipExclusive || isVip.value)
    );
  }
});

// 方法
const goToLogin = () => {
  router.push('/login');
};

const goToRegister = () => {
  router.push('/register');
};

const goToProfile = () => {
  router.push('/profile');
};

const goToVip = () => {
  router.push('/vip');
};

const changeCategory = (category) => {
  selectedCategory.value = category;
};

const productClickHandler = (item) => {
  if (item.isVipExclusive && !isVip.value) {
    goToVip();
  } else {
    // 假设商品详情路由是 /product/:id
    router.push(`/product/${item.id}`);
  }
};

const formatPrice = (price) => {
  return price > 0 ? `¥${price}` : 'VIP专享';
};

const getVipDiscount = (product) => {
  if (!product.vipPrice || product.vipPrice >= product.price) return 0;
  return Math.round((1 - product.vipPrice / product.price) * 100);
};

const nextSlide = () => {
  currentBannerIndex.value = (currentBannerIndex.value + 1) % banners.length;
};

const prevSlide = () => {
  currentBannerIndex.value = (currentBannerIndex.value - 1 + banners.length) % banners.length;
};

const startSlideInterval = () => {
  if (slideInterval.value) clearInterval(slideInterval.value);
  slideInterval.value = setInterval(nextSlide, 5000);
};

const stopSlideInterval = () => {
  if (slideInterval.value) {
    clearInterval(slideInterval.value);
    slideInterval.value = null;
  }
};

// 生命周期钩子
onMounted(() => {
  startSlideInterval();
});

onUnmounted(() => {
  stopSlideInterval();
});
</script>

<style scoped>
/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.home-container {
  min-height: 100vh;
  background-color: #f8f9fa;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 顶部导航栏 */
.home-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.logo-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-slogan {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-icon {
  font-size: 1.125rem;
}

.vip-button {
  background: linear-gradient(135deg, #ffb703 0%, #ff9500 100%);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.vip-button:hover {
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 149, 0, 0.3);
}

/* 轮播图 */
.banner-container {
  position: relative;
  height: 500px;
  margin: 2rem auto;
  max-width: 1200px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.banner {
  position: relative;
  height: 100%;
  width: 100%;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 3rem 2rem;
  color: white;
}

.banner-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.8s ease;
}

.banner-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeIn 1s ease 0.2s backwards;
}

.banner-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: fadeIn 1.2s ease 0.4s backwards;
}

.banner-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.banner-indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.indicator:hover,
.indicator.active {
  background-color: white;
  transform: scale(1.2);
  border-color: rgba(255, 255, 255, 0.8);
}

.banner-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.banner-control.prev {
  left: 1rem;
}

.banner-control.next {
  right: 1rem;
}

.banner-control:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* 轮播图过渡动画 */
.banner-fade-enter-active,
.banner-fade-leave-active {
  transition: opacity 0.5s ease;
}

.banner-fade-enter-from,
.banner-fade-leave-to {
  opacity: 0;
}

/* 平台优势 */
.features-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #333;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #667eea;
  filter: drop-shadow(0 5px 10px rgba(102, 126, 234, 0.2));
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.feature-description {
  color: #666;
  line-height: 1.6;
}

/* 分类导航 */
.category-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.category-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-container::-webkit-scrollbar {
  display: none;
}

.category-button {
  padding: 1rem 1.75rem;
  border: 2px solid #e0e0e0;
  background-color: white;
  color: #333;
  border-radius: 30px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  position: relative;
  font-weight: 500;
  flex-shrink: 0;
}

.category-button:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.category-button.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.vip-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ffb703 0%, #ff9500 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(255, 149, 0, 0.2);
}

/* 商品列表 */
.products-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.no-products {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.no-products p {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

.action-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-image-container {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.vip-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(135deg, #ffb703 0%, #ff9500 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.2);
}

.vip-discount {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #ff3b30 0%, #ff6347 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.product-info {
  padding: 1.5rem;
}

.product-title {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.product-price-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff3b30;
}

.original-price {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
}

.view-details-button {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.view-details-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* VIP相关样式 */
.vip-product {
  border: 2px solid #ff9500;
}

.vip-product::before {
  content: "VIP专享";
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #ffb703 0%, #ff9500 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.2);
}

/* 页脚 */
.page-footer {
  background: linear-gradient(135deg, #2a3b4c 0%, #1d2a38 100%);
  color: white;
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1.5px;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .home-header {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .logo-container {
    align-items: center;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .banner-container {
    height: 300px;
    margin: 1rem;
    border-radius: 12px;
  }
  
  .banner-overlay {
    padding: 2rem 1.5rem;
  }
  
  .banner-title {
    font-size: 1.75rem;
  }
  
  .banner-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .features-grid,
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  
  .product-image-container {
    height: 180px;
  }
  
  .page-footer {
    padding: 3rem 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .banner-container {
    height: 250px;
  }
  
  .banner-title {
    font-size: 1.5rem;
  }
  
  .banner-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .product-card {
    margin: 0 1rem;
  }
}
</style>
